Skip to content

Conversation

@kazutakahirata
Copy link
Contributor

No description provided.

@llvmbot llvmbot added the clang Clang issues not falling into any other category label May 26, 2025
@llvmbot
Copy link
Member

llvmbot commented May 26, 2025

@llvm/pr-subscribers-clang

Author: Kazu Hirata (kazutakahirata)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/141446.diff

1 Files Affected:

  • (modified) clang/unittests/Analysis/ExprMutationAnalyzerTest.cpp (+1-3)
diff --git a/clang/unittests/Analysis/ExprMutationAnalyzerTest.cpp b/clang/unittests/Analysis/ExprMutationAnalyzerTest.cpp
index 720999207083d..4e97174c17d95 100644
--- a/clang/unittests/Analysis/ExprMutationAnalyzerTest.cpp
+++ b/clang/unittests/Analysis/ExprMutationAnalyzerTest.cpp
@@ -86,9 +86,7 @@ mutatedBy(const SmallVectorImpl<BoundNodes> &Results, ASTUnit *AST) {
 }
 
 std::string removeSpace(std::string s) {
-  s.erase(std::remove_if(s.begin(), s.end(),
-                         [](char c) { return llvm::isSpace(c); }),
-          s.end());
+  llvm::erase_if(s, llvm::isSpace);
   return s;
 }
 

@kazutakahirata kazutakahirata merged commit ecd248f into llvm:main May 26, 2025
13 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_20250525_llvm_erase_if_clang branch May 26, 2025 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants